package android.medicalcloud.com.yiapp.base.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.umeng.analytics.MobclickAgent;


/**
 * Activity鍩虹被
 * 鎵�鏈堿ctivity鐨勫熀绫�
 * Created by yanbo on 16-7-4.
 */
public abstract class BaseActivity extends AppCompatActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutId());
        try{
        	initView();
            initEvent();
            initData();
        }catch(Exception e){
        	e.printStackTrace();
        }
        
   
    }


    protected abstract void initView();

    protected abstract void initEvent();

    protected abstract void initData();

    protected abstract int getLayoutId();

    @Override
    public void finish() {
        super.finish();
//        overridePendingTransition(R.anim.in_from_left, R.anim.out_to_right);
    }

    @Override
    protected void onResume() {
        super.onResume();
        MobclickAgent.onResume(this);

    }

    @Override
    protected void onPause() {
        super.onPause();
       MobclickAgent.onPause(this);
    }




}
